package ch2;

import java.util.*;

import ch1.Person;

public class MapTest2 {

	public static void main(String[] args) {
		Map m = new HashMap();
		m.put("dog", "狗");
		m.put(new Person("郑涵", "男"), "61班最帅的男人");
		m.put(new Person("许鹏", 22, "男"), "61班最壮的男人");

		m.put(new Person("汪翔", 23, "男"), "61班最衰的男人");
		m.put(new Person("汪翔", 23, "妖"), "61班最成功的男人");
		System.out.println(m.size());
		Object[] ar = m.keySet().toArray();
		for (Object o : ar) {
			Object v = m.get(o);
			System.out.println(o + "==" + v);
		}
	}

}
